package com.crane.oss.school.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.crane.common.core.dto.SingleResponse;
import com.crane.oss.app.bean.req.AppAddTaskReq;
import com.crane.oss.app.bean.req.AppCommitCommentReq;
import com.crane.oss.app.bean.req.AppDelCommentReq;
import com.crane.oss.app.bean.req.AppQueryTaskRopeDayDetailReq;
import com.crane.oss.app.bean.resp.*;
import com.crane.oss.school.bean.request.task.*;
import com.crane.oss.school.bean.resp.*;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Description: 任务服务
 * @Author: zx.pi
 * @Date: 2023/1/23
 */
public interface TaskService {

    /**
     * @Description: 查询web端跳绳任务列表
     * @Author: zx.pi
     * @Date: 2023/1/25
     */
    Map<String, List<TaskRopeWebResp>> queryTaskRopeList(QueryTaskRopeListReq req);

    TaskResp queryTaskDetail(Long taskId);

    IPage<TaskRopeStudentResp> queryTaskDetailRopeList(QueryTaskDetailRopeListReq request);

    /**
     * @Description: 统计个人跳绳情况
     * @Author: zx.pi
     * @Date: 2023/1/25
     */
    TotalSkipRopeResp queryTotalSkipRope(Long studentId);

    IPage<TaskStudentSkipRopeResp> queryStudentTaskDetailList(QueryStudentTaskDetailListReq request);

    /**
     * @Description: app查询老师任务列表
     * @Author: zx.pi
     * @Date: 2023/1/25
     */
    IPage<AppTeacherSkipRopeResp> queryTeacherSkipRopeList(QueryTaskRopeListReq req);

    /**
     * @Description: app老师任务详情
     * @Author: zx.pi
     * @Date: 2023/1/26
     */
    TaskTeacherSkipPopeResp queryTeacherSkipRopeDetail(Long taskId, Long partyId);

    /**
     * @Description: 查询任务当天打卡详情
     * @Author: zx.pi
     * @Date: 2023/3/2
     */

    TaskSkipPopeDayDetailResp queryTeacherSkipRopeDayDetail(AppQueryTaskRopeDayDetailReq req);

    /**
     * @Description: 添加评论
     * @Author: zx.pi
     * @Date: 2023/1/26
     */
    boolean commitComment(AppCommitCommentReq req);

    /**
     * @Description: 删除评论
     * @Author: zx.pi
     * @Date: 2023/1/26
     */
    boolean delComment(AppDelCommentReq req);

    /**
     * @Description: 删除任务
     * @Author: zx.pi
     * @Date: 2023/1/26
     */

    boolean delTask(Long taskId, Long partyId);

    /**
     * @Description: 发布任务
     * @Author: zx.pi
     * @Date: 2023/2/24
     */
    boolean addTask(AppAddTaskReq request);

    /**
     * @Description: 查询学生任务列表
     * @Author: zx.pi
     * @Date: 2023/2/28
     */
    IPage<AppStudentSkipRopeResp> queryTaskRopeStudentList(QueryStudentTaskRopeListReq request);

    /**
     * @Description: 老师查询学生详情
     * @Author: zx.pi
     * @Date: 2023/2/28
     */

    TaskStudentSkipPopeResp queryStudentSkipRopeDetail(Long taskId, Long studentId);
    /**
     * @Description: 查询学生详情
     * @Author: zx.pi
     * @Date: 2023/2/28
     */

    SingleResponse<TaskStudentSkipRopeResp> queryStudentSkipRopeDayDetail(AppQueryTaskRopeDayDetailReq request);

    /**
     * @Description: 开始任务
     * @Author: zx.pi
     * @Date: 2023/3/3
     */

    SingleResponse<Long> addTaskRopeReq(AddTaskRopeReq request);

    /**
     * @Description: 结束打卡
     * @Author: zx.pi
     * @Date: 2023/3/8
     */

    SingleResponse<Boolean> endTaskRopeReq(EndTaskRopeReq request);

    /**
     * @Description: 统计当日完成人数和最佳学生
     * @Author: zx.pi
     * @Date: 2023/3/8
     */

    void compluteTaskSkip();

    /**
     * @Description: 计算任务状态
     * @Author: zx.pi
     * @Date: 2023/3/8
     */

    void compluteTaskState();

}
